<?php

	/**
	 * Referer Information is passed from success() which can be called from any action that succeeds
	 */	
	
	if ($referer == '/users/add') {
		$heading	= $this->Html->tag('h2', 'Registration Successful!', array('class' => 'success'));
		$msg		= $this->Html->para(null, 'Thank you for signing up.');
	}
	elseif ($referer == '/users/login') {
		$heading	= $this->Html->tag('h2', 'Welcome!', array('class' => 'success'));
		$msg		= $this->Html->para(null, 'You\'re now logged in.');
	}else {
		$heading	= $this->Html->tag('h2', 'Naughty!', array('class' => 'fail'));
		$msg		= $this->Html->para(null, 'You must not visit this page directly.');
	}
	
	echo $heading;
	echo $msg;

?>
